<extend name="./Public/main" />
<block name="main">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>添加(修改)后台账号</h5>
                    </div>
                    <div class="ibox-content">
                        <form method="post" class="form-horizontal" action="{:U('Power/insertmember')}">
                            <input type="hidden" name="id" value="{$info.id}">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户名</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="username" value="{$info.username}" >
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">密码</label>
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" name="password" >
                                    <if condition="!empty($info['id'])">
                                     <span class="help-block m-b-none" style="color:red">不填写，则不修改</span>
                                    </if>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">电子邮箱</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="email" value="{$info.email}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">电话</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="phone" value="{$info.phone}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">状态
                                </label>

                                <div class="col-sm-10">
                                    <div class="radio i-checks">
                                        <label>
                                            <input type="radio" value="1" name="status" <if condition="$info.status eq 1">checked</if> > <i></i> 启用</label>
                                    </div>
                                    <div class="radio i-checks">
                                        <label>
                                            <input type="radio" value="0" name="status" <if condition="$info.status eq 0">checked</if> > <i></i> 停用</label>
                                    </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">分组</label>
                                <div class="col-sm-10">
                                    <select class="form-control m-b" name="gid">
                                        <volist name="list" id="vo">
                                           <option value="{$vo.id}" <if condition="$info.groupid eq $vo['id']">selected</if> >{$vo.title}</option>
                                        </volist>
                                    </select>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                    <button class="btn btn-white" type="button">取消</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>